package com.lalilu.lmedia.entity

data class LDictionary(
    val path: String,
    override val songs: List<LSong>
) : MusicParent() {
    override val name: String by lazy { path.trim('/').substringAfterLast('/') }
    override val id: String = path
}

fun List<LDictionary>.link() = onEach { dictionary ->
    dictionary.songs.forEach { it.link(dictionary) }
}